(function(){
	
	Ext.define('GridStore',{
		extend:'Ext.data.Store',
		autoLoad: true,
		fields: [
			{name:'id'},
			{name:'roleName'},
			{name:'createTime'},
			{name:'isUse'}
		],
		pageSize:20,
	    proxy: {
	        type: 'ajax',
	        url: '/sys/role/query.do',
	        reader: {
	            type: 'json',
	            root: 'objectList',
	            totalProperty:'allCount'
	        }
	    }
	});
	
	Ext.define('AppView.sys.role.SysRoleGrid',{
		extend:'AppView.base.BaseGrid',
		alias:'widget.sysrolegrid',
		selType: 'rowmodel',
		columns: [
	        { text: '角色名称',  dataIndex: 'roleName' ,flex: 1 },
	        {
	        	text: '是否启用', dataIndex: 'isUse', flex: 1,
	        	renderer:function(value){
		        	if(value==1){
		        		return '是'
		        	}else{
		        		return '否'
		        	}
	        	}
	        }
	    ],
	    editWin:'AppView.sys.role.SysRoleWin',
	    gridStore:'GridStore',
	    moduleUrl:'/sys/role',
	    initComponent:function(){
			this.callParent();
	    }
		
	})
})()